<?php

	class Connector_model extends CI_Model {

		protected $__tbname = 'connector';
		protected $__dbconf = 'default';

		var $id;	//int(10) unsigned	Primary Key	Auto Increment	NOT NULL
		var $id_provider;	//int(11)			NOT NULL
		var $name;	//varchar(255)			NOT NULL
		var $url;	//varchar(255)			NOT NULL
		var $frequency;	//int(10)			NULL
		var $type;	//tinyint(1)			NOT NULL
		var $class_name;	//varchar(255)			NULL
		var $start_execution;	//datetime			NULL
		var $end_execution;	//datetime			NULL
		var $country_code;	//varchar(2)			NULL
		var $language_code;	//varchar(2)			NULL
		var $status = 0;	//tinyint(1)			NOT NULL
		var $attempt_videos = 0;	//int(10)			NULL
		var $success_videos = 0;	//int(10)			NULL
		var $log_link;	//varchar(255)			NULL

		protected $__validation_rule = array(
			'id' => array('key' => 'PRI', 'type' => 'int', 'null' => FALSE, 'auto_increment' => TRUE),
			'id_provider' => array('type' => 'int', 'null' => FALSE),
			'name' => array('type' => 'varchar', 'size' => 255, 'null' => FALSE),
			'url' => array('type' => 'varchar', 'size' => 255, 'null' => FALSE),
			'frequency' => array('type' => 'int', 'null' => TRUE),
			'type' => array('type' => 'tinyint', 'null' => FALSE),
			'class_name' => array('type' => 'varchar', 'size' => 255, 'null' => TRUE),
			'start_execution' => array('type' => 'datetime', 'null' => TRUE),
			'end_execution' => array('type' => 'datetime', 'null' => TRUE),
			'country_code' => array('type' => 'varchar', 'size' => 2, 'null' => TRUE),
			'language_code' => array('type' => 'varchar', 'size' => 2, 'null' => TRUE),
			'status' => array('type' => 'tinyint', 'null' => FALSE),
			'attempt_videos' => array('type' => 'int', 'null' => TRUE),
			'success_videos' => array('type' => 'int', 'null' => TRUE),
			'log_link' => array('type' => 'varchar', 'size' => 255, 'null' => TRUE)
		);
	}
